const Joi = require('joi');

const submitExperiment = {
  body: Joi.object({
    experimentId: Joi.number().integer().required()
  }),
  files: Joi.array().min(1).max(5).items(
    Joi.object({
      fieldname: Joi.string().required(),
      originalname: Joi.string().required(),
      encoding: Joi.string().required(),
      mimetype: Joi.string().required(),
      size: Joi.number().max(50 * 1024 * 1024), // 50MB
      destination: Joi.string().required(),
      filename: Joi.string().required(),
      path: Joi.string().required()
    })
  ).required()
};

module.exports = {
  submitExperiment
};